Skip to content

Add Redis client self-identification for Apache Airflow#61866

Merged
potiuk merged 9 commits into
apache:mainfrom
vchomakov:redis-client-identification
Jun 9, 2026
Merged

Add Redis client self-identification for Apache Airflow#61866
potiuk merged 9 commits into
apache:mainfrom
vchomakov:redis-client-identification

Conversation

@vchomakov

Copy link
Copy Markdown
Contributor

Add Redis client self-identification for Apache Airflow's Redis provider, allowing Redis servers to identify Airflow connections via the CLIENT INFO command.

This implementation follows the Redis documentation recommendation for client libraries (https://redis.io/docs/latest/commands/client-setinfo/) and uses a dual approach for compatibility:

  • Uses DriverInfo class for redis-py 5.1.0+ to add "apache-airflow" as upstream driver
  • Falls back to lib_name parameter for older redis-py versions

This makes it easier for Redis administrators to monitor and debug connections from Airflow.

Changes:

  • Modified RedisHook.get_conn() to include driver identification
  • Added tests to verify driver info is included correctly
  • All tests pass, all linting checks pass

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Augment Code following the guidelines

@boring-cyborg

boring-cyborg Bot commented Feb 13, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@potiuk

potiuk commented Mar 3, 2026

Copy link
Copy Markdown
Member

Assuming tests pass.

@vchomakov vchomakov requested a review from potiuk March 6, 2026 16:18
@potiuk potiuk force-pushed the redis-client-identification branch from 8d0d324 to 9a96aca Compare March 7, 2026 12:40
@potiuk potiuk marked this pull request as draft March 11, 2026 16:17
@potiuk

potiuk commented Mar 11, 2026

Copy link
Copy Markdown
Member

@vchomakov Converting to draft — this PR doesn't yet meet our Pull Request quality criteria.

  • Provider tests: Failing: Low dep tests: providers / All-prov:LowestDeps:14:3.10:common.compat...redis. Run provider tests with breeze run pytest <provider-test-path> -xvs. See Provider tests docs.

Note: Your branch is 98 commits behind main. Please rebase and push again to get up-to-date CI results.

See the linked criteria for how to fix each item, then mark the PR "Ready for review". This is not a rejection — just an invitation to bring the PR up to standard. No rush.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@vchomakov vchomakov force-pushed the redis-client-identification branch from bdbbe0f to 4a2246f Compare March 11, 2026 17:45
@vchomakov vchomakov marked this pull request as ready for review April 2, 2026 11:47
@eladkal eladkal force-pushed the redis-client-identification branch from 0e1dcb2 to 327177d Compare April 7, 2026 07:34
@eladkal

eladkal commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

restarted the tests - lets see

@vchomakov vchomakov force-pushed the redis-client-identification branch from 327177d to f63c53f Compare April 7, 2026 14:23
@vchomakov

Copy link
Copy Markdown
Contributor Author

restarted the tests - lets see

Thanks @eladkal ! I addressed the test breakage. All tests pass now. Can you please allow the run of the remaining ones?

@kaxil kaxil requested a review from Copilot April 10, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Redis client self-identification in the Redis provider so Redis servers can attribute connections to Apache Airflow via CLIENT INFO / CLIENT SETINFO.

Changes:

  • Adds driver/client identification parameters when instantiating redis.Redis (prefers DriverInfo, falls back to lib_name).
  • Updates unit tests to validate the extra kwargs passed to the Redis client constructor.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
providers/redis/src/airflow/providers/redis/hooks/redis.py Adds Redis client self-identification via DriverInfo or lib_name fallback.
providers/redis/tests/unit/redis/hooks/test_redis.py Adjusts assertions to account for additional Redis constructor kwargs related to identification.

Comment thread providers/redis/src/airflow/providers/redis/hooks/redis.py Outdated
Comment thread providers/redis/tests/unit/redis/hooks/test_redis.py
Comment thread providers/redis/tests/unit/redis/hooks/test_redis.py Outdated
Comment thread providers/redis/src/airflow/providers/redis/hooks/redis.py Outdated
Comment thread providers/redis/src/airflow/providers/redis/hooks/redis.py Outdated
@potiuk potiuk marked this pull request as draft April 22, 2026 15:11
@potiuk

potiuk commented Apr 22, 2026

Copy link
Copy Markdown
Member

@vchomakov You replied to an earlier review round over a month ago, but several threads are still marked unresolved and the PR has not moved since. Converting to draft — this PR doesn't yet meet our Pull Request quality criteria.

  • Unresolved review comments (5 threads): please walk through each unresolved review thread. Even if a suggestion looks incorrect or irrelevant — and some of them will be, especially any comments left by automated reviewers like GitHub Copilot — it is still the author's responsibility to respond: apply the fix, reply in-thread with a brief explanation of why the suggestion does not apply, or resolve the thread if the feedback is no longer relevant. Leaving threads unaddressed for weeks blocks the PR from moving forward.

See the linked criteria for how to fix each item, then mark the PR "Ready for review". This is not a rejection — just an invitation to bring the PR up to standard. No rush.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@potiuk

potiuk commented Apr 22, 2026

Copy link
Copy Markdown
Member

Quick follow-up to the triage comment above — one clarification on the "Unresolved review comments" item:

Once you believe a thread has been addressed — whether by pushing a fix, or by replying in-thread with an explanation of why the suggestion doesn't apply — please mark the thread as resolved yourself by clicking the "Resolve conversation" button at the bottom of each thread. Reviewers don't auto-close their own threads, so an addressed-but-unresolved thread reads as "still waiting on the author" and keeps the PR from moving forward. The author doing the resolve-click is the expected convention on this project.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@vchomakov vchomakov marked this pull request as ready for review April 23, 2026 12:34
@vchomakov

Copy link
Copy Markdown
Contributor Author

Quick follow-up to the triage comment above — one clarification on the "Unresolved review comments" item:

Once you believe a thread has been addressed — whether by pushing a fix, or by replying in-thread with an explanation of why the suggestion doesn't apply — please mark the thread as resolved yourself by clicking the "Resolve conversation" button at the bottom of each thread. Reviewers don't auto-close their own threads, so an addressed-but-unresolved thread reads as "still waiting on the author" and keeps the PR from moving forward. The author doing the resolve-click is the expected convention on this project.

Thanks for the comment, @potiuk
I've addressed and resolved all comments and reopened the PR as Ready for review.

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label May 5, 2026
@potiuk potiuk merged commit 75cba29 into apache:main Jun 9, 2026
89 checks passed
@boring-cyborg

boring-cyborg Bot commented Jun 9, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:redis ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants